import store from '@/store'

export default {
  install(Vue) {
    Vue.directive('allow', {
      inserted: function(el, binding) {
        if (!store.state.user.userInfo.roles.points) {
          console.log(el, '不可见')
          el.parentNode.removeChild(el)
        } else {
          console.log(el, '可见')
        }
      }
    })
  }
}
